<?php

class Application_Model_Species {
	
	protected $_db_table_species;
	
	public function __construct() {
		
		$config = array(
			"name" => "Species",
			"primary" => "name"
		);
		$this->_db_table_species = new Zend_Db_Table($config);
		
	}
	
	public function insertSpecies($name) {
		
		$name = trim($name);
		if (strlen($name) == 0) {
			return false;
		}
		$data = array(
			"name" => $name
		);
		try {
			$this->_db_table_species->insert($data);
		} catch (Exception $e) {
			return false;
		}
		return true;
		
	}
	
}